#ifndef _RABINKARP_
#define _RABINKARP_

#include "Searcher.h"
#include <vector>
#include <iostream>
using namespace std;

#define MODULU 10000000
#define PRIME  5
#define SHORTEST_LENGTH
#define NOT_FOUND -1

class RabinKarp:public Searcher
{
	int _primeBase;
	int _modu;
	int _shortestSigLength;
	int _numSignatures;
	vector <int> _hashSignatures;
	vector <int> _signaturessLengths;

public:
	RabinKarp();
	virtual ~RabinKarp();
	unsigned long power(int,int);
	int hashVal(string&);
	int search(const string&);
	int findSignatures(const string &data);
	void init();
};
#endif//_RABINKARP_
